#include "newaccdlg.h"
#include "ui_newaccdlg.h"

NewAccDlg::NewAccDlg(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::NewAccDlg)
{
    ui->setupUi(this);
    ui->txtUser->setFocus();
    connect(this, SIGNAL(accepted()), this, SLOT(updateData()));
}

NewAccDlg::~NewAccDlg()
{
    delete ui;
}

void NewAccDlg::changeEvent(QEvent *e)
{
    QDialog::changeEvent(e);
    switch (e->type()) {
    case QEvent::LanguageChange:
        ui->retranslateUi(this);
        break;
    default:
        break;
    }
}

void NewAccDlg::updateData()
{
    user = ui->txtUser->text();
    pwd = ui->txtPwd->text();
}
